To ensure that human eyes can better observe screen content when a light ray changes, a terminal such as a mobile phone or a wearable device includes an ambient light sensor in order to detect luminance of external ambient light of the terminal. When the ambient light sensor detects that the luminance of the ambient light changes, the terminal adjusts luminance of a screen according to a detection result of the ambient light sensor in order to ensure that human eyes can better observe the screen.
When the ambient light sensor is disposed in the terminal and below the display screen, and detects an ambient light change using transmitted light, a detection result of the ambient light sensor is affected by an internal light ray of the display screen of the terminal, for example, backlight, or light that is obtained after a light ray of the screen is reflected on a surface of the screen. Consequently, a detection result of the ambient light sensor is inaccurate. For example, when the terminal is moved from a bright place to a dark place, because of impact of the internal light ray of the display screen of the terminal, the ambient light sensor cannot accurately detect the luminance of the ambient light.